package com.info33.platform.doc.entity;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.info33.platform.common.mvc.entity.BaseEntity;
import com.info33.platform.doc.util.enums.DocOperationTypeEnum;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 文档管理 - 文件用户
 * 
 * @author admin
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class DocFileUser extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "类型：1/部门、2/岗位、3/部门岗位、4/用户、5/所有用户")
    private Integer type;
    
    @ApiModelProperty(value = "操作类型（EDIT编辑DELETE删除DOWNLOAD下载PREVIEW预览）")
    private DocOperationTypeEnum operateType;

    @ApiModelProperty(value = "文件 id【doc_file】")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long fileId;

    @ApiModelProperty(value = "部门 id【sys_dept】")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long deptId;

    @ApiModelProperty(value = "岗位 id【sys_post】")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long postId;

    @ApiModelProperty(value = "用户 id【sys_tenant_user】")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long userId;

}